﻿using UnityEngine;
using System.Collections;

public class BackgroundManager : MonoBehaviour {

    public float bgSpeed = 2;
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
        transform.Translate(-Vector3.up * bgSpeed * Time.deltaTime);
        if(transform.position.y < -12.78f)
        {
            //transform.localPosition = Vector3.zero;
            transform.Translate(new Vector3(0, 12.78f, 0));
        }
    }
}
